Nice

The lower the level The higher the priority
The higher the level The lower the priority

Default is: 0
Range: -20 to 19

nice value is a user-space and priority
PR is the process's actual priority that use by Linux kernel.

In linux system priorities are 0 to 139
In which 0 to 99 for real time and 100 to 139 for users. Relation between nice value and priority is : PR = 20 + NI

In [ ]:
nice -n 10 bash
In [1]:
ps -o pid,comm,nice
  PID COMMAND          NI
  993 bash              0
 1846 ps                0
In [6]:
renice 10 993
993 (process ID) old priority 10, new priority 10
In [11]:
renice -n 10 -p 993
993 (process ID) old priority 10, new priority 10
In [12]:
ps -o pid,comm,nice
  PID COMMAND          NI
  993 bash             10
 2441 ps               10
In [ ]:
renice -n 10 `pidof chromium-browser`

Lecture notes

License

Creative Commons License

Linux Notes by Milad As (Ravexina) is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


ravexina's gitlab

ravexina's github